#ifndef MONSTERINFO_H_INCLUDED
#define MONSTERINFO_H_INCLUDED

#include <map>
#include <vector>

using std::vector;
using std::map;

struct MonsterAttr {
        ushort  m_index;
        ushort  m_tid;
        ushort  m_dead_tid;
        bool    m_hasdeadtile;
        ushort  m_hp;
        int     m_frame;
        string  m_name;
        BITMAP *m_tile;
        BITMAP *m_dtile;
};

class MonsterInfo {
public:
    bool LoadInfo(const char *dbfile);
    size_t size() const { return m_vmonsattr.size(); }
    const MonsterAttr &operator[](unsigned int i) { return m_vmonsattr[i]; }

private:
    typedef vector<MonsterAttr> VecMonsAttr;
    VecMonsAttr           m_vmonsattr;
    map<ushort, ushort>   m_vmonsIndex;
};

#endif // MONSTERINFO_H_INCLUDED
